<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>书城首页</title>
    <link type="text/css" rel="stylesheet" href="/static/css/style.css">
</head>

<body>

<div id="header">
    <div>
        <span>欢迎<span class="um_span">${username}</span>光临书城</span>
        <a href="/static/pages/user/login.html">登录</a> |
        <a href="/static/pages/user/regist.html">注册</a> &nbsp;&nbsp;
        <a href="http://localhost:8080/logout?username=@{username}">注销</a>&nbsp;&nbsp;
        <a href="http://localhost:8080/manager">后台管理</a>
    </div>
</div>
<div id="main">
    <div id="book">
    </div>
    <div class="b_list" th:each="book:${books}">
        <div class="img_div">
            <img class="book_img" alt="" src="${}" th:text="${book.imgPath}"/>
        </div>
        <div class="book_info">
            <div class="book_name" th:text="${book.name}">
                <span class="sp1">书名: ${}</span>
            </div>
            <div class="book_author" th:text="${book.author}">
                <span class="sp1">作者:</span>
                <span class="sp2">${}</span>
            </div>
            <div class="book_price" th:text="${book.price}">
                <span class="sp1">价格:</span>
                <span class="sp2">${}</span>
            </div>
            <div class="book_sales" th:text="${book.sales}">
                <span class="sp1">销量:</span>
                <span class="sp2">${}</span>
            </div>
            <div class="book_amount" th:text="${book.stock}">
                <span class="sp1">库存:</span>
                <span class="sp2">${}</span>
            </div>
            <div class="book_amount" th:text="${book.id}">
                <span class="sp1">编号:</span>
                <span class="sp2">${}</span>
            </div>
        </div>
    </div>
    <div>
        <div id="page_nav">
            <a href="http://localhost:8080/page?cur=1&size=4">首页</a>
            <span th:each="page:${pages}">
                <a href="http://localhost:8080/page?cur=${}&size=4" th:text="${page}">${}</a>
            </span>
            <a href="http://localhost:8080/page?cur=@{total}&size=4">末页</a>
        </div>
    </div>
</div>
</body>
</html>